package net.cellkyborg.RSInstances;

public abstract class RSCharacter extends RSMoveable {
	
	public RSCharacter() {
		super();
		destroy = false;
		updateRequired = false;
		animationUpdateRequired = false;
		chatTextUpdateRequired = false;
		faceToUpdateRequired = false;
		faceToNPCUpdateRequired = false;
		animationUpdateID = -1;
		animationUpdateDelay = 0;
		faceToNPCUpdateID = 65535;
	}
	
	protected boolean updateRequired, animationUpdateRequired,
			chatTextUpdateRequired, faceToUpdateRequired, faceToNPCUpdateRequired, graphicsUpdateRequired;

	public String chatText;
	public int chatEffects = 0;

	public int animationUpdateID, animationUpdateDelay, faceToNPCUpdateID, graphicsUpdateID, graphicsUpdateDelay;

	public boolean destroy;
	
	public abstract void handleWalkAction();
	
	public void destroy() {
		destroy = true;
	}
	
	public void doAnimation(int animID, int delay) {
		updateRequired=true;
		animationUpdateRequired=true;
		animationUpdateID=animID;
		animationUpdateDelay=delay;
	}
	
	public void doGraphics(int gid, int delay, int height) {
		updateRequired=true;
		graphicsUpdateRequired=true;
		graphicsUpdateID=gid;
		graphicsUpdateDelay=height << 16 + delay;
	}
}
